{% load blog_tags %}
<aside class="sidebar">
    <div class="widget widget_text">
        <div class="textwidget">
            <div class="social">
                <a href="https://github.com/kbsonlong" rel="external nofollow" title="Github" target="_blank">
                    <i class="tencentweibo fa fa-github"></i>
                </a>
                <a href="https://weibo.com/kbsonlong" rel="external nofollow" title="新浪微博" target="_blank">
                    <i class="sinaweibo fa fa-weibo"></i>
                </a>
                <a class="weixin">
                    <i class="weixins fa fa-weixin"></i>
                    <div class="weixin-popover">
                        <div class="popover bottom in">
                            <div class="arrow"></div>
                            <div class="popover-title">

                            </div>
                            <div class="popover-content">
                                <img src="https://www.alongparty.cn/img/weixin.bng" >
                            </div>
                        </div>
                    </div>
                </a>
                <a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=kbsonlong@gmail.com" rel="external nofollow" title="Email" target="_blank">
                    <i class="email fa fa-envelope-o"></i>
                </a>
                <a href="{% url "rss" %}" rel="external nofollow" target="_blank"  title="订阅本站">
                    <i class="rss fa fa-rss">

                    </i>
                </a>
            </div>
        </div>
    </div>

    <div class="widget widget_metaslider_widget">
        <div class="title"><h2>热门专题</h2></div><!-- meta slider -->
        <div style="width: 100%;" class="metaslider metaslider-nivo metaslider-2698 ml-slider meta-slider">
            <div id="metaslider_container_2698">
                <div class='slider-wrapper theme-bar'>
                    <div class='ribbon'></div>
                    <div id='metaslider_2698' class='nivoSlider'>
                        {% get_carousel_index as carousels %}
                        {% for carousel in carousels  %}
                            <a href="{{ carousel.url }}" target="_blank">
                                <img src="{{ MEDIA_URL }}{{ carousel.image }}" height="300" width="320" data-title="{{ carousel.content }}"
                                     title="{{ carousel.title }}" alt="{{ carousel.title }}" class="slider-2698 slide-1720"/>
                            </a>
                        {% endfor %}
                    </div>
                </div>

            </div>

        </div>
        <!--// meta slider-->
    </div>

    <!--广告栏-->
    <div class="widget widget_text">
        <div class="textwidget">
            <p>

            </p>
        </div>

    </div>
    <div class="widget widget_text">
        <div class="textwidget">

        </div>
    </div>

    <!--文章归档-->
    <div class="widget widget_archive">
        <div class="title">
            <h2>文章归档</h2>
        </div>
        {% get_data_date as data_date %}
        <ul>
            {% if data_date %}
                {% for date in data_date %}
                    <li><a href='{% url 'blog:date' date|date:'Y' date|date:'m' %}'>{{ date|date:'Y-m' }}</a></li>
                {% endfor %}
            {% else %}
                <div>近期没有发表过文章</div>
            {% endif %}
        </ul>
    </div>

    <!--猜你喜欢-->
    <div class="widget d_postlist">
        <div class="title">
            <h2>猜你喜欢</h2>
        </div>
        <ul>
            {% get_article_list 'love' 6 as hot_tag %}
            {% for hot in hot_tag %}
            <li>
                <a href="/article/{{ hot.slug }} " title="{{ hot.title }}"><span class="thumbnail"><img
                    src="{{ MEDIA_URL }}{{ hot.thumbnail }}" alt="{{ hot.title }}"/></span>
                    <span class="text">{{ hot.title }}</span>
                    <span class="muted">{{ hot.create_time|date:'Y-m-d' }}</span>
                    <span class="muted">{{ hot.love }}喜欢</span>
                </a>
            </li>
            {% endfor %}
        </ul>
    </div>

    <!--标签云-->
    <div class="widget d_tag">
        <div class="title">
            <h2>标签云</h2>
        </div>
        <div class="d_tags">
            {% get_tag_list as tags %}
            {% for tag in tags %}
                <a title="{{ tag.total_num }}个话题" href="{% url "blog:tag" tag.name %}">{{ tag.name }}({{ tag.total_num}})</a>
            {% endfor %}

        </div>
    </div>
    <div class="widget widget_links"><div class="title">
        <h2>友情链接</h2></div>
        <ul class='xoxo blogroll'>
            {% get_friends as friends %}
            {% for friend in friends %}
                {% if friend.is_show %}
                    <li><a href="{{ friend.link }}" target="_blank">{{ friend.name }}</a></li>
                {% endif %}
            {% endfor %}

        </ul>
    </div>

    <!--广告栏-->
    <div class="widget widget_text">
        <div class="title">
            <h2>精品推荐</h2>
        </div>
        <div class="textwidget">
            <div class="side-ad">
            </div>
            <style>
                #BAIDU_SSP__wrapper_u2578794_1 {
                display:none;
                }
                #BAIDU_SSP__wrapper_u2578794_0 #iframeu2578794_0  .bd-logo2 {
                display:none !important;
                }
            </style>
        </div>
    </div>

    <div class="widget widget_text">
        <div class="textwidget">
            <a href="https://edu.hellobi.com/course/157" style="display:none">
            </a>
        </div>
    </div>
</aside>